#include <stdio.h>
#include <math.h>

int main()
{
    double a, x0, x1;
    printf("enter a positive number:");
    scanf("%lf", &a);
    x0 = a / 2;
    do
    {
        x1 = (x0 + a / x0) / 2;
        if (fabs(x1 - x0) < 1e-5)
            break;
        x0 = x1;
    } while (1);

    printf("The square root of %.2lf is %.5lf\n", a, x1);
    return 0;
}